package com.mymoney.resources;

import com.mymoney.auth.DeviceContext;
import com.mymoney.persistence.PersistenceContext;
import com.mymoney.persistence.th.PersistenceAware;
import com.mymoney.web.utils.RequestHelper;

public abstract class AbstractWebResource implements PersistenceAware {

	@javax.ws.rs.core.Context
	javax.servlet.http.HttpServletRequest request;

	public PersistenceContext getPersistenceContext() {
		return RequestHelper.getPersistenceContext(request);
	}
	
	public DeviceContext getDeviceContext() {
		return RequestHelper.getDeviceContext(request);
	}
	
}
